<?php require(dirname(__FILE__)."/../../globals.inc"); $mikron->Page->StartBody(); ?>
<?php

if(isset($_GET['payment']) &&
    isset($_GET['time']) &&
    isset($_GET['amount']) &&
    isset($_GET['amountout']) &&
    isset($_GET['comment']))
{
    
    try
    {
        $id = $_GET['payment'];
        $time = $_GET['time'];
        $comment = $_GET['comment'];
        $amount = (int)$_GET['amount'];
        $amountout = (int)$_GET['amountout'];

        $y = new YANDEX_PURSEHISTORY();
        $y->paymentid->value = $id;
        $y->paymenttime->value = $time;
        $y->amount->value = $amount;
        $y->amountout->value = $amountout;
        $y->comment->value = $comment;
        $y->Save();

    }
    catch(Exception $ex)
    {
        criticalerror("Ошибка в файле ".__FILE__." в строке ".__LINE__.", ".$ex->getMessage(), null, true);
    }
}
else
{
    echo "wrong packet";
    print_r($_GET);
}

?>
<?php $mikron->Page->EndBody(); ?>